package com.ojoin.trade.common.utils.excel;

import java.io.FileInputStream;
import java.io.PushbackInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Main {
	
	public static void main(String[] args) throws Exception {
		IRowReader reader = new RowReader();
		 
		/*final Map sheetData = new HashMap();
		IRowReader reader = new IRowReader(){
			public  void getRows(int sheetIndex,String sheetName,int curRow, List rowlist) throws Exception{
					  List  sheet,row;
				      if(sheetData.containsKey(sheetName)){
				    	    sheet=(ArrayList) sheetData.get(sheetName);
				      }else{
				    	    sheet=new ArrayList();
				    	    sheetData.put(sheetName, sheet);
				      }
				      row= new ArrayList(rowlist);
				       
				      sheet.add(curRow, row);
			 }
			};*/
			 		
		FileInputStream in= new FileInputStream(" 契税.xls");
		FileInputStream inx= new FileInputStream(" 契税.xlsx");
		long b1=System.currentTimeMillis();
		ExcelReaderUtil.readExcel(reader, in);
		System.out.println("b1="+(System.currentTimeMillis()-b1)/1000);
		
		System.out.println("---------------------------------------------------------");
		long b2=System.currentTimeMillis();
		ExcelReaderUtil.readExcel(reader, inx);
		System.out.println("b2="+(System.currentTimeMillis()-b2)/1000);
		
		
//		String xls=" ts.xls";
//		xls="ts.xls";
//		xls="ts.xlsx";
		
//		ExcelReaderUtil.readExcel(reader, " ts.xls");
//		System.out.println("---------------------------------------------------------");
//		ExcelReaderUtil.readExcel(reader, " ts.xlsx");
		
		/*FileInputStream in= new FileInputStream(" ts.xls");
		FileInputStream inx= new FileInputStream(" ts.xlsx");
		ExcelReaderUtil.readExcel(reader, in); 
		System.out.println("---------------------------------------------------------");
		ExcelReaderUtil.readExcel(reader, inx);*/
	}
}
